package c.j.a.d.b.j;

import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import c.j.a.c.y.a.i;
import c.j.a.d.b.e.a;
import com.ss.android.socialbase.downloader.downloader.DownloadService;

/* compiled from: DefaultDownloadServiceHandler */
public class m extends a {
    public static final String i = "m";

    public void c() {
        if (i.s(262144)) {
            this.c = true;
            this.e = false;
            if (c.j.a.d.b.g.a.b()) {
                c.j.a.d.b.g.a.d(i, "onStartCommandOnMainThread");
            }
        }
    }

    public void d(Intent intent, int i, int i2) {
        if (c.j.a.d.b.g.a.b()) {
            c.j.a.d.b.g.a.d(i, "onStartCommand");
        }
        if (!i.s(262144)) {
            this.c = true;
        }
        g();
    }

    public void e(Context context, ServiceConnection serviceConnection) {
        try {
            context.startService(new Intent(context, DownloadService.class));
        } catch (Throwable th) {
            th.printStackTrace();
        }
    }
}
